package com.involveinnovation.chatserver.controller.Model;

import lombok.*;

import java.util.ArrayList;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class UserList {
    ArrayList userList;
    String type = "在线列表";

    @Override
    public String toString() {
        String message = "{\"type\":\"" + type + "\",\"userList\":\"";
        for(int i=0;i<userList.size();i++){
            if (i == 0) {
                message = message + userList.get(i);
            } else {
                message = message + "," + userList.get(i);
            }
        }
        message  = message + "\"}";
        return message;
    }
}
